GDK/Win32: Deal with leftovers from removal of GdkWindow items
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 28 Oct 2016 05:42:55 +0000 (13:42 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 28 Oct 2016 07:56:36 +0000 (15:56 +0800)
We need to further remove items for the removal of:
-GdkWindow->depth (commit 6cc94ff)
-gdk_window_get_visual()/GdkWindow->visual (commit f420dc7)
-GDK visual query APIs (commit 45c0379)

https://bugzilla.gnome.org/show_bug.cgi?id=773299

gdk/win32/gdkglcontext-win32.c
gdk/win32/gdkscreen-win32.c
gdk/win32/gdkwindow-win32.c

index 499f8313e4578fe70779388d7d45c3cbc7bd2157..02684c7bceca3a823d3dd46db427ade55106a391 100644 (file)
@@ -420,9 +420,8 @@ _create_gl_context (HDC hdc,
 }
 
 static gboolean
-_set_pixformat_for_hdc (HDC hdc,
-                        gint *best_idx,
-                        const gboolean need_alpha_bits)
+_set_pixformat_for_hdc (HDC   hdc,
+                        gint *best_idx)
 {
   PIXELFORMATDESCRIPTOR pfd;
   gboolean set_pixel_format_result = FALSE;
@@ -430,7 +429,7 @@ _set_pixformat_for_hdc (HDC hdc,
   /* one is only allowed to call SetPixelFormat(), and so ChoosePixelFormat()
    * one single time per window HDC
    */
-  *best_idx = _get_wgl_pfd (hdc, need_alpha_bits, &pfd);
+  *best_idx = _get_wgl_pfd (hdc, &pfd);
   if (*best_idx != 0)
     set_pixel_format_result = SetPixelFormat (hdc, *best_idx, &pfd);
 
@@ -461,8 +460,7 @@ _gdk_win32_gl_context_realize (GdkGLContext *context,
   GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
 
   if (!_set_pixformat_for_hdc (context_win32->gl_hdc,
-                               &pixel_format,
-                               context_win32->need_alpha_bits))
+                               &pixel_format))
     {
       g_set_error_literal (error, GDK_GL_ERROR,
                            GDK_GL_ERROR_UNSUPPORTED_FORMAT,
index ebb9ff3c1080cc3deb97589c2f0b7aa68b10f146..cf2243c7a3cf69c75a7419e127c231e74f186705 100644 (file)
@@ -297,10 +297,8 @@ init_root_window (GdkWin32Screen *screen_win32)
   impl_win32->wrapper = window;
 
   window->impl_window = window;
-  window->visual = gdk_screen_get_system_visual (screen);
 
   window->window_type = GDK_WINDOW_ROOT;
-  window->depth = window->visual->depth;
 
   screen_win32->root_window = window;
 
index c0ba2bcd5964e8ce8d3cc6533b4177fd1a596b0e..0b189a54bae2e47e3ac5d9158d042795ef1a4c74 100644 (file)
@@ -953,7 +953,6 @@ gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
     return g_object_ref (window);
 
   window = _gdk_display_create_window (display);
-  window->visual = gdk_screen_get_system_visual (gdk_display_get_default_screen (display));
   window->impl = g_object_new (GDK_TYPE_WINDOW_IMPL_WIN32, NULL);
   window->impl_window = window;
   impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
@@ -992,7 +991,6 @@ gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
   window->state &= (~GDK_WINDOW_STATE_BELOW);
   window->viewable = TRUE;
 
-  window->depth = gdk_visual_get_system ()->depth;
   GDK_WINDOW_HWND (window) = anid;
 
   g_object_ref (window);